package com.itheima.web;

import com.itheima.cofig.SpringConfiguration;
import com.itheima.service.UserService;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 张义
 * @describe:
 * @date 2021/06/19
 */

public class Contronller {
    public static void main(String[] args){
//        ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");   走 xml 配置文件
        ApplicationContext app = new AnnotationConfigApplicationContext(SpringConfiguration.class);
        UserService userService = app.getBean(UserService.class);
        userService.save();
    }
}
